#include <stdio.h>
#include <math.h>
int main()
{
	int a=0;
	scanf("%d", &a);
	double outcome=0.0;
	double b=1.0;
	int c=1;
	
	for(b=1.0; (1.0/b)>pow(10.0,-(double)a);c=c+2)
	{
		if(c % 4 == 1)
		{
			outcome = outcome + (1.0/c) * 4;
			
			b = c;
		}
		else 
		{
			outcome = outcome - (1.0/c) * 4;
			
			b = c;
		}
	}
	printf("%lf",outcome);
	
	return 0;
}

